<template>
  <div class="header">
    <el-tag
      closable
      v-for="(item, index) in this.$store.state.tab_bread"
      :key="index"
      :path="item.url"
      @close="remove"
    >
      <router-link :to="item.url">{{ item.title }}</router-link>
    </el-tag>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    remove(data) {
      console.log(data);
      data.target.parentElement.remove();
    },
  },
};
</script>

<style scoped>
.header {
  margin: 10px 0;
}
.el-tag {
  margin-right: 10px;
}
.router-link-active {
  color: #537bff;
}
</style>
